package com.mini.dubbo.consumer.discovery;

import redis.clients.jedis.Jedis;

import com.mini.dubbo.api.RedisConfig;

/**
 * @author yzy
 * Created by yzy on 2021-12-04
 */
public class RedisServiceDiscovery implements IServiceDiscovery{

    public String discover(String serviceName) {
        Jedis jedis = new Jedis(RedisConfig.redis_address, RedisConfig.redis_port);
        String address = jedis.get(serviceName);
        return address;
    }
}
